<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>我的</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../themes/jquery.mobile.icons.min.css" />
    <link rel="stylesheet" href="http://wanjia.mcooz.com/views/mobile_basic/skin/default/css/mobile.css" />
    <link rel="stylesheet" href="../themes/orange.min.css" />
  
    <script type="text/javascript" charset="UTF-8" src="http://wanjia.mcooz.com/runtime/_systemjs/jquery/jquery-1.11.3.min.js"></script><script type="text/javascript" charset="UTF-8" src="http://wanjia.mcooz.com/runtime/_systemjs/jquery/jquery-migrate-1.2.1.min.js"></script>
    <script src="http://wanjia.mcooz.com/views/mobile_basic/javascript/mobile.js"></script>
    <link rel="stylesheet" href="http://wanjia.mcooz.com/views/mobile_basic/skin/default/css/index.css" />
      <link href="../font/css/font-awesome.css" rel="stylesheet">

        <script type="text/javascript" charset="UTF-8" src="http://wanjia.mcooz.com/runtime/_systemjs/form/form.js"></script>
    <script type="text/javascript" charset="UTF-8" src="http://wanjia.mcooz.com/runtime/_systemjs/autovalidate/validate.js"></script>
    <link rel="stylesheet" type="text/css" href="http://wanjia.mcooz.com/runtime/_systemjs/autovalidate/style.css" />
     <script type="text/javascript" charset="UTF-8" src="http://wanjia.mcooz.com/runtime/_systemjs/artTemplate/artTemplate.js"></script><script type="text/javascript" charset="UTF-8" src="http://wanjia.mcooz.com/runtime/_systemjs/artTemplate/artTemplate-plugin.js"></script>
    <script type="text/javascript" src="../script/api.js"></script>
      <script type="text/javascript" src="../script/main.js"></script>

<style>
    .blue{color:#ff7700;}
    .pdt20{padding-top: 20px;}
</style>

</head>

<body>

<div data-role="page" id="Home" data-theme="a">
 

<div role="main">
    <div class="kros_content ">

    <div class="row clearfix  plr pdt20">
            <div class="text-center"  >
                 您还没有登录
            </div>
            <div class="text-center">
                  <span class="btn ui-btn ui-shadow" style="display:inline-block;font-size:12px">立即登录</span>
            </div>
        </div>

        <div class="row clearfix  plr">
            <div class="col-md-6 col-xs-6 column"  id="user">
                <h4 class="text-left">
                 <i class="fa fa-user mgr6 blue"> </i>  用户名:<span>null</span>
                    </h4>
            </div>
            <div class="col-md-6 col-xs-6 column">
                <h4 class="text-left">
                    直播:2
                    </h4>
            </div>
        </div>
        <ul data-role="listview" data-theme="b" class="kros_view">
            <li><a href="#" data-transition="flow" data-ajax="false"><i class="fa fa-jpy mgr6 blue"></i>我的收益</a></li>
             <li><a href="#" data-transition="flow" data-ajax="false">
            <i class="fa fa-minus mgr6 blue" aria-hidden="true"></i>
我的钻石</a></li>
            <li><a href="#" data-transition="flow" data-ajax="false"><i class="fa fa-angle-double-up mgr6 blue"></i>我的等级</a></li>
            <li><a href="#" data-transition="flow" data-ajax="false"><i class="fa fa-file-text mgr6 blue"></i>申请认证</a></li>
               <li><a href="#" data-transition="flow" data-ajax="false"><i class="fa fa-at mgr6 blue"></i>关于我们</a></li>
            <li><a href="#" data-transition="flow" data-ajax="false"><i class="fa fa-cog mgr6 blue"></i>设置</a></li>
       
        </ul>
    </div>
</div>
    </div>

   

</body>
</html>
<script type='text/html' id='userCenterTemplate'>
<%=username%>
</script>
<script type='text/html' id='logTemplate'>
<button onclick="goToPage('../login.html');">登录</button>
</script>


<script>
    
    apiready = function(){


          /*var userHtml = template.render('userTemplate',1);
            $('#user').append(userHtml);
*/



        userArr= $api.getStorage('userArr');
        //alert(userArr);
       // uid=userArr.user_id;
/*console.log(uid);
       alert(uid)*/
       //判断uid是否定义,也可用判断userArr是否为空作为条件
        

         if (userArr) {



 var userCenterHtml = template.render('userCenterTemplate',userArr);




            $('#user').empty().append(userCenterHtml);



            }
            else

            {

                 var logHtml = template.render('logTemplate',1);

                 $('#user').empty().append(logHtml);



            };



    }


    function login(){


    }
</script>
